When saving image data of a handwritten form or document, first a compression parameter is tentatively set for compressing the image data, and, then, the image data is encoded according to the tentatively set compression parameter. Then, the encoded image data is decoded, and the image quality of the decoded image is checked by a person to determine the compression parameter to be used. The image data is encoded according to the thus-determined compression parameter, and the thus-encoded image data is saved.
The following patent documents disclose a background art.                Patent Document 1: Japanese Laid-Open Patent Application No. 2006-270199        Patent Document 2: Japanese Laid-Open Patent Application No. H11-167623        Patent Document 3: Japanese Laid-Open Patent Application No. H7-95395        Patent Document 4: Japanese Laid-Open Patent Application No. 2008-5219        
The method of evaluating an image quality by visual checking by a person depends on one's subjectivity and involves personal equation. Additionally, if the image is decoded according to a compression parameter set by a person, it may be difficult to judge whether the value of the compression parameter is an optimum value. Accordingly, it may be difficult to set an appropriate compression parameter, which causes image data of a form or document to be readable, while reducing an amount of data to be saved.